
export interface banner {
  companyName: string
  slogan: string
  logo: string
  gradient: string
}
export interface services {
  id: number
  title: string
  description: string
  icon: string
  iconColor: string
  iconBg: string

}
export interface cases {
  id: number
  title: string
  description: string
  image: string
  alt: string
}
export interface team {
  id: number
  name: string
  role: string
  avatar: string
  borderColor: string
}
// export interface partners string[] // 只需要logo URL数组

/**
 * 网站基本信息类型
 * 对应表: site_info
 */
export interface SiteInfo {
  id?: number;
  companyName: string;
  slogan: string;
  logo: string; // 存储相对路径而非URL
  gradient: string;
  created_at?: string; // 或 Date
  updated_at?: string; // 或 Date
}

/**
 * 核心服务类型
 * 对应表: services
 */
export interface Service {
  id?: string | number;
  title: string;
  description: string;
  icon: string;
  iconBg: string;
  iconColor: string;
  image?: string;
}


/**
 * 客户案例类型
 * 对应表: case_studies
 */
export interface CaseStudy {
  id?: number;
  title: string;
  description: string;
  image: string; // 存储在服务器的文件名
  alt?: string; // 可选字段
}

/**
 * 团队成员类型
 * 对应表: team_members
 */
export interface TeamMember {
  id?: number;
  name: string;
  role: string;
  avatar?: string; // 用于dicebear的种子参数
  avatar_seed?: string; // 用于dicebear的种子参数
  border_color_class: string; // 如border-indigo-100
  sort_order: number;
  is_leadership: boolean;
  created_at?: string; // 或 Date
  updated_at?: string; // 或 Date
}

/**
 * 合作伙伴类型
 * 对应表: partners
 */
export interface Partner {
  id?: number;
  name: string;
  logo_seed: string; // 用于dicebear的种子参数
  website_url?: string; // 可选字段
  sort_order: number;
  partnership_since?: string; // 或 Date | null
}


/**
 * 联系表单提交类型
 * 对应表: contact_submissions
 */
export type ContactStatus = 'pending' | 'processing' | 'completed';

export interface ContactSubmission {
  id?: number;
  name: string;
  contact_info: string;
  requirements: string;
  ip_address?: string; // 可选字段
  user_agent?: string; // 可选字段
  status: ContactStatus;
}

// 所有类型集合（可选）
export interface DatabaseTypes {
  banner: SiteInfo;
  services: Service[];
  cases: CaseStudy[];
  team: TeamMember[];
  partners: string[];
  ContactSubmission?: ContactSubmission;
}

export interface SiteData {
  data: DatabaseTypes,
  error?: string;
  code?: number;
  message?: string;
  success?: boolean;
  timestamp?: number;
}

